/** Biorhythmix
 * @author Vitaliy Lagutin
 * @version 1.0
 */

import java.awt.FlowLayout;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

import javax.swing.JButton;
import javax.swing.JFrame;
import javax.swing.JLabel;

class VerifErrorMessage extends JFrame {
	JLabel jlab1, jlab2;
	JButton jbtn;
		
	VerifErrorMessage(String textmessege) {
		final JFrame jfrm = new JFrame("Error verification Date of Birth");
		jfrm.getContentPane().setLayout(new FlowLayout());
		jfrm.setSize(420, 80);
		jfrm.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);
		
		jlab1 = new JLabel();
		jlab1.setText(textmessege);
		
		jlab2 = new JLabel();
		jlab2.setText("Введите правильную дату.");
		
		jbtn = new JButton("ok");
		jbtn.addActionListener(new ActionListener() {
			public void actionPerformed (ActionEvent ae) {
				jfrm.setVisible(false);
			}
		});
		
		jfrm.add(jlab1);
		jfrm.add(jlab2);
		jfrm.add(jbtn);
		
		jfrm.setVisible(true);
	}
}